﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Data;
//using MySql.Data.MySqlClient;

//namespace MySQL.Db
//{
//	public class Benchmark
//	{
//		public static void Test(int iterations, out long elapsedNew, out long elapsedOld)
//		{
//			elapsedNew = TestNew(iterations);
//			elapsedOld = TestOld(iterations);
//		}

//		public static long TestNew(int iterations)
//		{
//			long elapsed = 0;

//			MySqlConnection connection;

//			connection = new MySqlConnection("Datasource=localhost;Database=gollie;uid=gollie;pwd=R43$#-'Rv.!n2OJ;");
//			connection.Open();

//			MySqlCommand command = new MySqlCommand("SELECT * FROM user;", connection);

//			for (int i = 0; i < iterations; i++)
//			{
//				MySqlDataReader reader = command.ExecuteReader();

//				ResultSet resultSet = new ResultSet(reader);

//				elapsed += resultSet.elapsed;

//				reader.Close();
//			}

//			connection.Close();

//			return elapsed;
//		}

//		public static long TestOld(int iterations)
//		{
//			long elapsed = 0;

//			MySqlConnection connection;

//			connection = new MySqlConnection("Datasource=localhost;Database=gollie;uid=gollie;pwd=R43$#-'Rv.!n2OJ;");
//			connection.Open();

//			MySqlCommand command = new MySqlCommand("SELECT * FROM user;", connection);

//			for (int i = 0; i < iterations; i++)
//			{
//				MySqlDataReader reader = command.ExecuteReader();

//				ResultSetOld resultSet = new ResultSetOld(reader);

//				elapsed += resultSet.elapsed;

//				reader.Close();
//			}

//			connection.Close();

//			return elapsed;
//		}
//	}
//}
